module.exports = function(grunt) {
	require('load-grunt-tasks')(grunt); // 
	//监控test.html文件 修改之后更新修改时间
	grunt.initConfig({
		pkg: grunt.file.readJSON('package.json'),

		concat: {
			options: {
				process: function(src, filepath) {
					var patt1=new RegExp("<footer><p>.*</p></footer>","g");
					
					return src.replace(patt1, "<footer><p> @ "+new Date().toLocaleString()+"</p></footer>");
				}
			},
			dist: {
				src: ['./index.html'],
				dest: './index.html'
			}
		},
		watch: {
		  build:{
				files:['./index.html'],
				tasks:['concat'],
				options:{
					spawn:false
				}
			}
		}

	});
	grunt.loadNpmTasks('grunt-contrib-concat');
	grunt.loadNpmTasks('grunt-contrib-watch');
	grunt.loadNpmTasks('grunt-git');
	grunt.registerTask('default', ['concat']);
}